package com.zb.designmode.bridge.readthing.stream;

import java.io.InputStream;

/**
 * <p>description：</p>
 * <p>copyright： copyright(C)2016-2099</p>
 * <p>Life is short,we need passion</p>
 * <p>Summary： </p>
 * <p>instructions： </p>
 * Date 3/16/21</p>
 * Author mac
 *
 * @version 1.0
 */
public abstract class AbstractStream {
    protected InputStream in;
    protected int size;

    public byte[] readBytes() throws Exception {
        byte buf[] = new byte[size];
        in.read(buf);
        return buf;
    }

    public void close() throws Exception {
        in.close();
    }
}
